<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue中的条件渲染</title>
    <script src="./vue.js"></script>
</head>

<body>
    <div id='app'>
        <!-- if else 标签一起写 -->
        <!-- <div v-if="show"> {{message}}</div>
        <div v-else>Bye world</div> -->
        
        <div v-if="show"> 用户名：
            <input key="name" />
        </div>
        <div v-else> 邮箱名：
            <input key="email" />
        </div>

        <!-- <div v-show="show"> {{message}}</div> -->
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                show: false,
            }
        })
    </script>
</body>

</html>